Method and apparatus for encoding/decoding intra prediction mode

ABSTRACT

An image decoding method, according to the present invention, includes the steps of: deriving an MPM candidate mode from neighboring blocks adjacent to a target block to be decoded; generating an MPM list using the MPM candidate mode derived from the neighboring blocks; and deriving an intra prediction mode for the target block to be decoded using the generated MPM list. According to the present invention, image compression efficiency can be improved.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.16/105,222 filed on Aug. 20, 2018, which is a continuation of U.S.patent application Ser. No. 15/201,811 filed on Jul. 5, 2016, now U.S.Pat. No. 10,091,503, issued Oct. 2, 2018, which is a continuation ofU.S. patent application Ser. No. 14/346,756 having a 371(c) date of Mar.24, 2014, now U.S. Pat. No. 9,432,675, issued Aug. 30, 2016, which is aU.S. national stage application of International Application No.PCT/KR2012/007255, filed on Sep. 10, 2012, which claims to the benefitof Korean Patent Applications No. 10-2011-0098602, filed on Sep. 28,2011 and Korean Patent Applications No. 10-2011-0114882, filed on Nov.7, 2011, in the Korean Intellectual Property Office, the entiredisclosures of each of which are incorporated herein by reference forall purposes.

TECHNICAL FIELD

The present invention relates to image processing, and more specificallyto an intra prediction mode encoding/decoding method and apparatus.

Background Art

Recently, HD (High Definition) resolution broadcast services arespreading nationwide and worldwide, and many uses are familiar withhigh-resolution, high-quality images. Accordingly, many organizationsput more energy on development of next-generation imaging apparatuses.Further, more interest is drawn to UHD (Ultra High Definition) thatprovides four times or more higher resolution than that of HDTV as wellas HDTV, and thus, an compression technology is required forhigher-resolution, higher-quality images.

For image compression, there may be used an inter prediction technologythat predicts a pixel value included in a current picture from picturesthat temporally come earlier and/or later than the current picture, anintra prediction technology that predicts a pixel value included in acurrent picture using pixel information in the current picture, andentropy encoding technology that allocates a shorter code to a symbolappearing more frequently and a longer code to a symbol appearing lessfrequently.

DISCLOSURE Technical Problem

An object of the present invention is to provide an image encodingmethod and apparatus that may enhance image compression efficiency.

Another object of the present invention is to provide an image decodingmethod and apparatus that may enhance image compression efficiency.

Still another object of the present invention is to an intra predictionmode encoding method and apparatus that may enhance image compressionefficiency.

Yet still another object of the present invention is to an intraprediction mode decoding method and apparatus that may enhance imagecompression efficiency.

Technical Solution

An aspect of the present invention is an image decoding method. Themethod includes the steps of deriving an MPM candidate mode from aneighboring block adjacent to a block to be decoded, generating an MPMlist using the MPM candidate mode derived from the neighboring block,and deriving an intra prediction mode of the block to be decoded usingthe generated MPM list, wherein the number of MPM candidate modesincluded in the MPM list is a predetermined fixed number.

In a case where the prediction mode of the neighboring block is notincluded in prediction modes that may be owned by the block to bedecoded, the step of deriving the MPM candidate mode from theneighboring block adjacent to the block to be decoded may include thesteps of changing the prediction mode of the neighboring block into afinal prediction mode and selecting the final prediction mode as the MPMcandidate mode, wherein the final prediction mode is one of theprediction modes that may be owned by the block to be decoded.

The final prediction mode may be a non-directional mode.

The final prediction mode may be a prediction mode whose mode value is0.

The final prediction mode may be derived by a predetermined fixedcalculation method.

A mode value of the prediction mode derived by the predetermined fixedcalculation method may be a remainder obtained by dividing the modevalue of the prediction mode for the neighboring block by the number ofthe prediction modes that may be owned by the block to be decoded.

The final prediction mode may be a prediction mode having a highestfrequency of occurrence among the prediction modes that may be owned bythe block to be decoded, and the frequency of occurrence is proportionalto the number of times of occurrence of a prediction mode accumulated ina current decoding process.

The step of generating the MPM list using the MPM candidate mode derivedfrom the neighboring block may include the steps of obtaining anadditional MPM candidate mode using an intra prediction mode except forthe MPM candidate mode derived from the neighboring block and assigningthe obtained additional MPM candidate mode to the MPM list.

The additional MPM candidate mode may be a non-directional mode.

The additional MPM candidate mode may be a directional prediction modehaving a prediction direction most similar to a prediction direction ofthe MPM candidate mode derived from the neighboring block.

The additional MPM candidate mode may be a prediction mode having ahighest frequency of occurrence among intra prediction modes except forthe MPM candidate mode derived from the neighboring block, and whereinthe frequency of occurrence is proportional to the number of times ofoccurrence of the intra prediction modes accumulated in a currentdecoding process.

Another aspect of the present invention is an image decoding apparatusincludes an entropy decoding unit that entropy-decodes an MPM flagtransmitted from an encoding unit and an intra prediction unit thatderives an MPM candidate mode from a neighboring block adjacent to ablock to be decoded, generates an MPM list using the MPM candidate modederived from the neighboring block, derives an intra prediction mode ofthe block to be decoded using the generated MPM list and theentropy-decoded MPM flag, and performs intra prediction on the block tobe decoded using the derived intra prediction mode, wherein the numberof MPM candidate modes included in the MPM list is a predetermined fixednumber.

Still another aspect of the present invention is an intra predictionmode decoding method. The method may include the steps of deriving anMPM candidate mode from a neighboring block adjacent to a block to bedecoded, generating an MPM list using the MPM candidate mode derivedfrom the neighboring block, and deriving an intra prediction mode of theblock to be decoded using the generated MPM list, wherein the number ofMPM candidate modes included in the MPM list is a predetermined fixednumber.

In a case where the prediction mode of the neighboring block is notincluded in prediction modes that may be owned by the block to bedecoded, the step of deriving the MPM candidate mode from theneighboring block adjacent to the block to be decoded may include thesteps of changing the prediction mode of the neighboring block into afinal prediction mode and selecting the final prediction mode as the MPMcandidate mode, wherein the final prediction mode is one of theprediction modes that may be owned by the block to be decoded.

The step of generating the MPM list using the MPM candidate mode derivedfrom the neighboring block may include the steps of obtaining anadditional MPM candidate mode using an intra prediction mode except forthe MPM candidate mode derived from the neighboring block and assigningthe obtained additional MPM candidate mode to the MPM list.

Advantageous Effects

An image encoding method and apparatus according to the presentinvention may enhance image compression efficiency.

An image decoding method and apparatus according to the presentinvention may enhance image compression efficiency.

An intra prediction mode encoding method and apparatus according to thepresent invention may enhance image compression efficiency.

An intra prediction mode decoding method and apparatus according to thepresent invention may enhance image compression efficiency.

DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram illustrating a configuration of an imageencoding apparatus according to an embodiment of the present invention.

FIG. 2 is a block diagram illustrating a configuration an image decodingapparatus according to an embodiment of the present invention.

FIG. 3 is a conceptual view schematically illustrating neighboringblocks used to derive an MPM candidate mode according to an embodimentof the present invention.

FIG. 4 is a flowchart schematically illustrating an intra predictionmode encoding method according to an embodiment of the presentinvention.

FIG. 5 is a flowchart schematically illustrating a method of deriving anMPM candidate mode using a prediction mode of a neighboring block of ablock to be encoded according to an embodiment of the present invention.

FIG. 6 is a conceptual view schematically illustrating an example wherea prediction mode of a neighboring block is not included in theprediction modes that may be owned by the block to be encoded accordingto an embodiment of the present invention.

FIG. 7 is a flowchart schematically illustrating an intra predictionmode decoding method according to an embodiment of the presentinvention.

FIG. 8 is a flowchart schematically illustrating a method of deriving anMPM candidate mode using a prediction mode of a neighboring block for ablock to be decoded according to an embodiment of the present invention.

BEST MODE

Hereinafter, embodiments of the present invention will be described indetail with reference to the drawings. In describing the embodiments ofthe invention, when determined to make the gist of the inventionunclear, the specific description of the relevant known configuration orfunctions will be omitted.

When an element is “connected to” or “coupled to” another element, theelement may be directly connected or coupled to the other element, butother elements may also be present therebetween. Further, “including” aspecific configuration does not exclude other configurations, and ratheran additional configuration may be included in the embodiments or thescope of the invention.

The terms, such as “first” and “second”, may be used to describe variouscomponents, but the components should not be limited to the terms. Theterms are used only to distinguish one element from another. Forexample, a first component may be named a second component withoutdeparting from the scope of the invention, and similarly, the secondcomponent may be also named the first component.

The components in the embodiments of the invention are independentlyillustrated to represent different features from each other, and it doesnot mean that each component is not composed of separate hardware or onesoftware component unit. That is, the components are separated from eachother for convenience of description, and at least two components may becombined into a single component or one component may be split intoplural components which then may perform respective functions. Thecombined or split components are also included in the scope of theinvention without departing from the gist of the invention.

Further, some components are not inevitable components that performessential functions of the invention but may be optional components formerely enhancing performance. The present invention may be implementedas including only the components necessary for implementing the gist ofthe invention except for components used for merely enhancingperformance, and any configuration including only the necessarycomponents except for the optional components used for merely enhancingperformance is also included in the scope of the invention.

FIG. 1 is a block diagram illustrating a configuration of an imageencoding apparatus according to an embodiment of the present invention.

Referring to FIG. 1, the image encoding apparatus 100 includes a motionestimation unit 111, a motion compensation unit 112, an intra predictionunit 120, a switch 115, a subtracter 125, a transformation unit 130, aquantization unit 140, an entropy encoding unit 150, an inversequantization unit 160, an inverse transformation unit 170, an adder 175,a filter unit 180, and a reference picture buffer 190.

The image encoding apparatus 100 may perform encoding on an input imagein an intra mode or inter mode and may output a bit stream. The intraprediction means intra-frame prediction, and the inter prediction meansinter-frame prediction. In case of the intra mode, the switch 115 mayswitch to “intra”, and in case of the inter mode, the switch 115 mayswitch to “inter”. The image encoding apparatus 100 may generate aprediction block for an input block of the input image and then mayencode a residual between the input block and the prediction block.

In case of intra mode, the intra prediction unit 120 may generate aprediction block by performing spatial prediction using a pixel value ofan already encoded block adjacent to a current block.

In case of inter mode, the motion estimation unit 111 may obtain amotion vector by finding a reason that best matches the input block in areference image that is stored in the reference picture buffer 190 inthe course of motion estimation. The motion compensation unit 112 maygenerate the prediction block by performing motion compensation usingthe motion vector.

The subtracter 125 may generate a residual block by the residue betweenthe prediction block generated and the input block. The transformationunit 130 may perform transform on the residual block to output atransform coefficient. The quantization unit 140 may quantize the inputtransform coefficient according to a quantization parameter to output aquantized coefficient.

The entropy encoding unit 150 may perform entropy encoding based on theencoding parameter value obtained in the course of encoding or valuesobtained by the quantization unit 140 to thereby output a bit stream.

Upon application of entropy encoding, symbols are represented so that asmaller number of bits are assigned to a symbol more likely to begenerated, and a larger number of bits are assigned to a symbol lesslikely to be generated, and thus, the size of bit stream for symbols tobe encoded may decrease. Accordingly, compression performance of imageencoding may be increased by entropy encoding. The entropy encoding unit150 may use an encoding scheme, such as exponential golomb,CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-AdaptiveBinary Arithmetic Coding), in order to perform entropy encoding.

Since the image encoding apparatus according to an embodimentillustrated in FIG. 1 performs inter prediction encoding, i.e.,inter-frame prediction encoding, the currently encoded image needs to beencoded and stored to be used as a reference image. Accordingly, thequantized coefficient is inverse-quantized in the inverse quantizationunit 160 and inverse-transformed in the inverse transformation unit 170.The inverse-quantized, inverse-transformed coefficient is added to theprediction block by the adder 175 so that a reconstructed block isgenerated.

The reconstructed block passes through the filter unit 180, and thefilter unit 180 may apply at least one or more of a de-blocking filter,an SAO (Sample Adaptive Offset), and an ALF (Adaptive Loop Filter) tothe reconstructed block or reconstructed picture. The filter unit 180may be also called adaptive in-loop filter. The de-blocking filter mayremove a block distortion that is created at a boundary between blocks.The SAO may add a proper offset value to a pixel value so as tocompensate for a coding error. The ALF may perform filtering based on avalue obtained by comparing the reconstructed image with the originalimage, and only when high efficiency applies, such filtering may beperformed as well. Passing through the filter unit 180, thereconstructed block may be stored in the reference picture buffer 190.

FIG. 2 is a block diagram illustrating a configuration an image decodingapparatus according to an embodiment of the present invention.

Referring to FIG. 2, the image decoding apparatus 200 includes anentropy decoding unit 210, an inverse-quantization unit 220, aninverse-transformation unit 230, an intra prediction unit 240, a motioncompensation unit 250, an adder 255, a filter unit 260, and a referencepicture buffer 270.

The image decoding apparatus 200 may receive the bit stream output fromthe encoding unit, perform decoding in an intra mode or inter mode, andoutput a reconfigured image, i.e., reconstructed image. In case of intramode, the switch may switch to “intra”, and in case of inter mode, theswitch may switch to “inter”. The image decoding apparatus 200 mayobtain a residual block from the received bit stream, generate aprediction block, and add the residual block and the prediction block,thereby generating a reconfigured block, i.e., reconstructed block.

The entropy decoding unit 210 may entropy-decode the input bit streamaccording to a probability distribution to thereby generate symbolsincluding symbols which are of a quantized-coefficient type. Theentropy-decoding method is similar to the entropy-encoding method.

In case of applying the entropy-decoding method, the symbols arerepresented so that a smaller number of bits are assigned to a symbolmore likely to be generated, and a larger number of bits are assigned toa symbol less likely to be generated, thereby resulting in a decrease inthe size of the bit stream for the symbols. Accordingly, image decodingcompression performance may be increased by the entropy decoding method.

The quantized coefficient is inverse-quantized by theinverse-quantization unit 220 and inverse-transformed by theinverse-transformation unit 230. As a result of the quantizedcoefficient being inverse-quantized and inverse-transformed, a residualblock may be generated.

In case of an intra mode, the intra prediction unit 240 may generate aprediction block by performing spatial prediction using a pixel value ofan already encoded block adjacent to the current block. In case of aninter mode, the motion compensation unit 250 may generate a predictionblock by performing motion compensation using a reference image that isstored in the reference picture buffer 270 and the motion vector.

The residual block and the prediction block are added to each other bythe adder 255, and the added blocks may get through the filter unit 260.The filter unit 260 may apply at least one or more of a de-blockingfilter, an SAO, and an ALF to the reconstructed block or reconstructedpicture. The filter unit 260 may output a reconfigured image, i.e.,reconstructed image. The reconstructed image may be stored in thereference picture buffer 270 and used for inter prediction.

Hereinafter, the block means a unit of image encoding and decoding. Uponimage encoding and decoding, a unit of encoding or decoding means a unitsplit when an image is split and encoded or decoded, and thus, it may bereferred to as a coding unit (CU), a prediction unit (PU), a transformunit (TU), or a transform block. One block may be subdivided intosubblocks having a smaller size.

The intra prediction may be performed according to an intra predictionmode of the block to be encoded/decoded. The number of intra predictionmodes that may be owned by the block to be encoded/decoded may be fixed,and examples of the fixed number may be 4, 18, and 35. The followingtable 1 shows examples of the number of intra prediction modes that maybe owned by the block to be encoded/decoded according to the size of theblock to be encoded/decoded.

TABLE 1 Block size No. of modes 4 × 4 18 8 × 8 35 16 × 16 35 32 × 32 3564 × 64 4

The encoding unit may encode the intra prediction mode and transmit theencoded intra prediction mode to the decoding unit. When encoding theintra prediction mode for a block to be encoded and transmitting theencoded intra prediction mode, the encoding unit may use a method ofpredicting an intra prediction mode so as to increase encodingefficiency while decreasing the bits to be transmitted.

Since the prediction mode of the block to be encoded has a high chanceof being the same as the prediction mode of a neighboring block, theencoding unit may encode the prediction mode of the block to be encodedby using the prediction modes of blocks adjacent to the block to beencoded. Hereinafter, prediction modes used as prediction values forintra prediction mode of the block to be encoded are referred to as MPMs(Most Probable Modes). Hereinafter, the neighboring blocks mean blocksadjacent to the current block.

FIG. 3 is a conceptual view schematically illustrating neighboringblocks used to derive an MPM candidate mode according to an embodimentof the present invention. Referring to FIG. 3, the encoding unit and/ordecoding unit may use at least one or more of prediction modes of blocksA, B, D, and E so as to derive an MPM candidate mode used for intra modeencoding of block C to be encoded. Hereinafter, in the followingembodiments, the encoding unit and/or decoding unit are assumed to aprediction mode of the left neighboring block A and a prediction mode ofan upper neighboring block B to derive the MPM candidate mode. Forexample, to encode the intra prediction mode of the block to be encoded,the encoding unit and/or decoding unit may select the prediction modesof the blocks A and B as MPM candidate modes. FIG. 4 is a flowchartschematically illustrating an intra prediction mode encoding methodaccording to an embodiment of the present invention.

Referring to FIG. 4, the encoding unit may derive an MPM candidate modefrom neighboring blocks adjacent to a block to be encoded (S410). Theencoding unit may select a prediction mode of a neighboring block, asis, as an MPM candidate mode or may vary the prediction mode of theneighboring block and then select the varied final prediction mode asthe MPM candidate mode. A specific embodiment of a method of deriving anMPM candidate mode using prediction modes of neighboring blocks will bedescribed later with reference to FIG. 5.

The encoding unit may generate an MPM list using derived MPM candidatemodes (S420). At this time, the encoding unit may assign MPM candidatemodes derived from neighboring blocks to the MPM list.

For example, in the case that the prediction mode of a left neighboringblock and the prediction mode of an upper neighboring block are, as is,selected as MPM candidate modes, the number of MPM candidate modesincluded in the MPM list may be 1 or 2. At this time, in the case thatthe prediction mode of the left neighboring block and the predictionmode of the upper neighboring block are the same as each other, thenumber of MPM candidate modes included in the MPM list may be 1, and inthe case that the prediction mode of the left neighboring block isdifferent from the prediction mode of the upper neighboring block, thenumber of MPM candidate modes included in the MPM list may be 2.

The encoding unit may use a predetermined fixed number of MPM candidatemodes in order to encode the intra prediction mode. At this time, thenumber of MPM candidate modes included in the MPM list may be the sameas the predetermined fixed number. The predetermined fixed number may be1 or more, for example, 2, 3, or 4.

In an embodiment, in the case that the MPM candidate modes are derivedusing the prediction mode of the left neighboring block and theprediction mode of the upper neighboring block, the MPM candidate modesincluded in the MPM list may be fixed as 2. For example, the two MPMcandidate modes, respectively, may be assigned to list[0] and list[1].At this time, as an example, among the MPM candidate modes, the smallermode may be assigned to list[0], and the larger mode may be assigned tolist[1]. Here, ‘list’ may refer to the MPM list, list[0] to the firstentry of the MPM list, and list[1] to the second entry of the MPM list.

In the case that a predetermined fixed number of MPM candidate modes areused for intra prediction, the number of the MPM candidate modes derivedfrom the neighboring blocks may be smaller than the predetermined fixednumber. In this case, there may be additional MPM candidate modes to beincluded in the MPM list. For example, it is assumed that the number ofthe MPM candidate modes in the MPM list is fixed as 2, and the encodingunit derives the MPM candidate modes using the prediction mode of theupper neighboring block and the prediction mode of the left neighboringblock. In the case that the MPM candidate mode derived from theprediction mode of the left neighboring block is the same as the MPMcandidate mode derived from the prediction mode of the upper neighboringblock, the number of MPM candidate modes derived from the neighboringblocks may be 1. Since the number of the MPM candidate modes is fixed as2, an additional MPM candidate mode may be needed to obtain a remainingentry included in the MPM list.

The additional MPM candidate mode may be selected among intra predictionmodes except form the MPM candidate modes derived from the neighboringblocks.

In an embodiment of a method of deriving the additional MPM candidatemode, the encoding unit may select a predetermined fixed specificprediction mode as an additional MPM candidate mode. For example, in thecase that the number of the MPM candidate modes in the MPM list is fixedas 2, and two MPM candidate modes derived from the neighboring blocksare the same as each other, the encoding unit may select a DC mode orplanar mode, which is a non-directional mode, as the additional MPMcandidate mode and may assign it to the MPM list.

In another embodiment of a method of deriving the additional MPMcandidate mode, the encoding unit may select as the MPM candidate mode adirectional prediction mode having a prediction direction most similarto a prediction mode of the MPM candidate mode derived from theneighboring block.

For example, in the case that the MPM candidate mode derived from theneighboring block is a vertical mode, the encoding unit may select avertical-1 mode and/or a vertical+1 mode, which are prediction modeshaving a prediction direction most similar to a prediction direction ofthe mode, as additional MPM candidate modes and may assign them to theMPM list. At this time, in an embodiment, the mode value of the verticalmode may be 1, the mode value of vertical-1 mode may be 22, and the modevalue of vertcal+1 mode may be 23.

In another embodiment of a method of deriving the additional MPMcandidate mode, the encoding unit may select a prediction mode mostfrequently appearing as an additional MPM candidate mode.

For example, in the course of encoding, the encoding unit may accumulatethe number of times of occurrence of each prediction mode, which may beowned by the block to be encoded. The accumulated number of times mayindicate the frequency of occurrence, and the encoding unit may select aprediction mode having the highest frequency of occurrence as theadditional MPM candidate mode and may assign it to the MPM list.

The encoding unit may accumulate the number of times of occurrence ofthe prediction mode on a per-slice basis and/or on a per-entropy slicebasis. At this time, the degree of accumulation on a per-slice basisand/or on a per-entropy slice basis may vary, and the encoding unit mayadaptively select the prediction mode having a high frequency ofoccurrence as an additional MPM candidate mode.

According to the above-described method, since the encoding unit mayselect the additional MPM candidate mode without using a separate table,no separate storage space is required, and complexity of operation maybe reduced. Further, the encoding unit may adaptively select theadditional MPM candidate mode according to the frequency of occurrenceof the intra prediction mode, and thus, image compression efficiency maybe enhanced.

Referring back to FIG. 4, the encoding unit may encode the intraprediction mode using the generated MPM list (S430).

The encoding unit may determine whether there is an MPM candidate modethat is the same as the prediction mode of the block to be encoded inthe MPM list. The encoding unit may transmit to the decoding unit a flagindicating whether there is an MPM candidate mode the same as theprediction mode of the block to be encoded in the MPM list. Hereinafter,the flag is referred to as an MPM flag.

In an embodiment, the MPM flag transmitted to the decoding unit may berepresented as prev_intra_luma_pred_flag. For example, if there is anMPM candidate mode the same as the prediction mode of the block to beencoded in the MPM list, 1 may be assigned to the MPM flag, andotherwise, 0 may be assigned to the MPM flag.

If there is an MPM candidate mode the same as the prediction mode of theblock to be encoded in the MPM list, the encoding unit may transmit tothe decoding unit an index indicating which MPM candidate mode among theMPM candidate modes in the MPM list is the same as the prediction modeof the block to be encoded. Hereinafter, the index may be referred to asan “MPM index”. In an embodiment, the MPM index may be represented asmpm_idx.

If there is no MPM candidate mode the same as the prediction mode of theblock to be encoded in the MPM list, the encoding unit may derive aremaining mode by using the MPM list and the prediction mode of thecurrent block to be encoded. The encoding unit may encode the generatedremaining mode and transmit the encoded remaining mode to the decodingunit. In an embodiment, the remaining mode may be represented asrem_intra_luma_pred_mode.

FIG. 5 is a flowchart schematically illustrating a method of deriving anMPM candidate mode using a prediction mode of a neighboring block of ablock to be encoded according to an embodiment of the present invention.

Referring to FIG. 5, the encoding unit may determine whether aprediction mode of a neighboring block is included in the predictionmode that may be owned by the block to be encoded (S510).

As described above in connection with table 1, the number of the intraprediction modes that may be owned by the current block to be encodedmay be a predetermined fixed value. At this time, the prediction mode ofthe neighboring block may not be included in the prediction mode thatmay be owned by the block to be encoded.

FIG. 6 is a conceptual view schematically illustrating an example wherea prediction mode of a neighboring block is not included in theprediction modes that may be owned by the block to be encoded accordingto an embodiment of the present invention. In the embodiment illustratedin FIG. 6, it is assumed that the block C to be encoded has a size of4×4, an upper neighboring block B has a size of 8×8, and the predictionmode of the block to be encoded is 15 and the prediction mode of theupper neighboring block is 23.

Since the size of the block to be encoded is 4×4, in reference to theembodiment described in connection with table 1, the block to be encodedmay have one of 18 prediction modes (0 to 17). The prediction mode valueof the upper neighboring block B is 23, and the maximum mode value ofthe current block to be encoded is 17, and thus, the prediction mode ofthe neighboring block may not be included in the prediction modes thatmay be owned by the current block to be encoded.

Referring back to FIG. 5, in the case that the prediction mode of theneighboring block is included in the prediction modes that may be ownedby the block to be encoded, the encoding unit may select the predictionmode of the neighboring block, as is, as the MPM candidate mode (S520).

In the case that the prediction mode of the neighboring block is notincluded in the prediction modes that may be owned by the block to beencoded, the encoding unit may change the prediction mode of theneighboring block to derive an MPM candidate mode (S530). At this time,the encoding unit may change the prediction mode of the neighboringblock as one of the intra prediction modes that may be owned by thecurrent block to be encoded.

For example, in the embodiment illustrated in FIG. 6, the block C to beencoded may have prediction modes 0 to 17. Accordingly, the encodingunit may change the prediction mode 23 of the upper neighboring block Bto one of the prediction modes 0 to 17 to derive the MPM candidate mode.

The change of the prediction mode of the neighboring block may beperformed by various methods. Hereinafter, embodiments of methods ofchanging the prediction mode of the neighboring block will be described.

In an embodiment, in the case that the prediction mode of theneighboring block is not included in the prediction modes that may beowned by the block to be encoded, the encoding unit may change theprediction mode of the neighboring block into a non-directional mode.The non-directional prediction mode may include a DC mode or a planarmode. For example, the process in which the prediction mode of theneighboring block changes to the planar mode may be represented asfollows:

If intraPredModeN is equal to or larger than intraPredModeNum,

candIntraPredModeN=Intra_Planar

If intraPredModeN is smaller than intraPredModeNum,

candIntraPredModeN=intraPredModeN

Here, intraPredModeN may refer to an intra prediction mode of aneighboring block. For example, in the embodiment illustrated in FIG. 3,when N is A, intraPredModeN may represent a prediction mode of the upperneighboring block. intraPredModeNum may represent the number of intraprediction modes that may be owned by the block to be encoded. Forexample, the number of the intra prediction modes may be set as in theembodiment described in table 1 according to the size of the block to beencoded. candIntraPredModeN may represent the final prediction mode ofthe changed neighboring block.

In another embodiment, in the case that the prediction mode of theneighboring block is not included in the prediction modes that may beowned by the block to be encoded, the encoding unit may change theprediction mode of the neighboring block into a prediction mode whosemode value is 0. Since an order of the intra prediction modes isgenerally set based on the frequency of occurrence, the frequency ofoccurrence of a prediction mode having a mode value 0 has a higherchance of being larger than the frequency of occurrence of otherprediction modes. Accordingly, since the prediction mode of the currentblock to be encoded has a high chance of being a prediction mode whosemode value is 0, the encoding unit may enhance encoding efficiency bychanging the prediction mode of the neighboring block into a predictionmode whose mode value is 0.

In another embodiment, in the case that the prediction mode of theneighboring block is not included in the prediction modes that may beowned by the block to be encoded, the encoding unit may change theprediction mode of the neighboring block into a prediction modecalculated by a predetermined calculation method.

For example, the predetermined calculation method may be a method ofobtaining a remainder that is obtained by dividing the prediction modeof the neighboring block by the number of the intra prediction modesthat may be owned by the block to be encoded and/or the maximumprediction mode value that may be owned by the block to be encoded. Thatis, the final prediction mode value of the changed neighboring block maybe a remainder obtained by dividing the prediction mode of theneighboring block by the number of the intra prediction modes that maybe owned by the block to be encoded and/or the maximum prediction modevalue that may be owned by the block to be encoded. A process ofchanging the prediction mode of the neighboring block using thepredetermined calculation method may be represented as follows:

If intraPredModeN is equal to or larger than intraPredModeNum,

>>if intraPredModeNum is 4,

candlntraPredModeN=mod(intraPredModeN, 4)

>>unless intraPredModeNum is 4,

candlntraPredModeN=mod(intraPredModeN, 18)

if intraPredModeN is smaller than intraPredModeNum,

candlntraPredModeN=intraPredModeN

Here, mod(X, Y) may represent a remainder obtained by dividing X by Y.

In another embodiment, in the case that the prediction mode of theneighboring block is not included in the prediction modes that may beowned by the block to be encoded, the encoding unit may change theprediction mode of the neighboring block into the prediction mode havingthe highest frequency of occurrence among the prediction modes that maybe owned by the block to be encoded.

For example, in the course of encoding, the encoding unit may accumulatethe number of times of occurrence of each of the prediction modes thatmay be owned by the current block to be encoded. The accumulated numberof times of occurrence may represent a frequency of occurrence, and inan embodiment, the frequency of occurrence may be proportional to theaccumulated number of times of occurrence. The encoding unit may changethe prediction mode of the neighboring block into the prediction modehaving the highest frequency of occurrence.

The encoding unit may also accumulate the number of times of occurrenceof each prediction mode on a per-slice basis and/or on a per-entropyslice basis. At this time, the degree accumulated on a per-slice basisand/or on a per-entropy slice basis may vary, and the encoding unit mayadaptively change the prediction mode of the neighboring block into aprediction mode having a high frequency of occurrence.

Referring back to FIG. 5, the encoding unit may select the changed finalprediction mode as the MPM candidate mode (S540).

The above-described MPM candidate mode deriving method may derive theMPM candidate mode without using a separate table, thus eliminating theneed of a separate storage and resulting in a decrease in operationcomplexity. Further, the encoding unit may adaptively derive the MPMcandidate mode according to the frequency of occurrence of the intraprediction mode, and thus, image compression efficiency may be enhanced.

FIG. 7 is a flowchart schematically illustrating an intra predictionmode decoding method according to an embodiment of the presentinvention.

Referring to FIG. 7, the decoding unit may parse the MPM flag (S710). Asdescribed above, the MPM flag is a flag indicating whether the MPM listincludes an MPM candidate mode the same as the prediction mode of theblock to be encoded.

In an embodiment, the MPM flag may be represented asprev_intra_luma_pred_flag. For example, in the case that the MPM listincludes an MPM candidate mode the same as the prediction mode of theblock to be encoded, 1 may be assigned to the MPM flag, and otherwise, 0may be assigned to the MPM flag.

The decoding unit may derive the MPM candidate mode from neighboringblocks adjacent to the block to be encoded (S720). The decoding unit mayselect the prediction mode of the neighboring block, as is, as the MPMcandidate mode, or may change the prediction mode of the neighboringblock and may select the changed final prediction mode as the MPMcandidate mode. A specific embodiment of an MPM candidate mode derivingmethod using the prediction mode of the neighboring block will bedescribed later with reference to FIG. 8

The decoding unit may generate the MPM list using the derived MPMcandidate modes (S730). At this time, the decoding unit may assign theMPM candidate modes derived from the neighboring blocks to the MPM list.For example, in the case that the prediction mode of the leftneighboring block and the prediction mode of the upper neighboring blockare, as is, selected as the MPM candidate modes, the number of the MPMcandidate modes included in the MPM list may be 1 or 2. At this time, inthe case that the prediction mode of the left neighboring block is thesame as the prediction mode of the upper neighboring block, the numberof the MPM candidate modes included in the MPM list may be 1, or in thecase that the prediction mode of the left neighboring block is differentfrom the prediction mode of the upper neighboring block, the number ofMPM candidate modes included in the MPM list may be 2.

The decoding unit may always use a predetermined fixed number of MPMcandidate modes to encode intra prediction modes. At this time, thenumber of MPM candidate modes included in the MPM list may be the sameas the predetermined fixed number. The predetermined fixed number may be1 or more, for example, 2, 3, or 4.

In an embodiment, in the case that the MPM candidate modes are derivedusing the prediction mode of the left neighboring block and theprediction mode of the upper neighboring block, the number of the MPMcandidate modes included in the MPM list may be fixed to 2. For example,two MPM candidate modes, respectively, may be assigned to list[0] andlist[1]. At this time, as an example, the one having a smaller modevalue among the MPM candidate modes may be assigned to list[0], and theone having a larger mode value among the MPM candidate modes may beassigned to list[1]. Here, list may refer to the MPM list, list[0] to afirst entry in the MPM list, and list[1] to a second entry in the MPMlist.

In the case that a predetermined fixed number of MPM candidate modes areused for intra prediction, the number of the MPM candidate modes derivedfrom the neighboring blocks may be smaller than the predetermined fixednumber. At this time, additional MPM candidate modes may be needed thatare included in the MPM list.

For example, it is assumed that the number of the MPM candidate modes inthe MPM list is fixed to 2, and the decoding unit derives the MPMcandidate modes using the prediction mode of the upper neighboring blockand the prediction mode of the left neighboring block. In the case thatthe MPM candidate mode derived from the prediction mode of the leftneighboring block is the same as the MPM candidate mode derived from theprediction mode of the upper neighboring block, the number of the MPMcandidate modes derived from the neighboring blocks may be 1. Since thenumber of the MPM candidate modes is fixed to 2, additional MPMcandidate modes may be needed to obtain the remaining entry included inthe MPM list.

The additional MPM candidate mode may be selected among the intraprediction modes except for the MPM candidate modes derived from theneighboring blocks.

In an embodiment of a method of deriving the additional MPM candidatemode, the decoding unit may select a predetermined fixed specificprediction mode as the additional MPM candidate mode. For example, inthe case that the number of the MPM candidate modes in the MPM list, andtwo MPM candidate modes derived from the neighboring blocks are the sameas each other, the decoding unit may select a DC mode or planar mode,which is a non-directional mode, as the additional MPM candidate modeand may assign the selected MPM candidate mode to the MPM list. Inanother embodiment of a method of deriving the additional MPM candidatemode, the decoding unit may select as the additional MPM candidate modea directional prediction mode having a prediction direction most similarto the prediction direction of the MPM candidate mode derived from theneighboring block.

For example, in the case that the MPM candidate mode derived from theupper neighboring block is a vertical mode, the decoding unit may selecta vertical-1 mode and/or vertical+1 mode, which are directionalprediction modes having a prediction direction most similar to aprediction direction of the mode, as the MPM candidate modes and mayassign the selected MPM candidate modes to the MPM list. At this time,in an embodiment, the mode value of the vertical mode may be 1, the modevalue of vertical−1 mode 22, and the mode value of vertical +1 23.

In still another embodiment of a method of deriving the additional MPMcandidate mode, the decoding unit may select a prediction mode havingthe highest frequency of occurrence as the additional MPM candidatemode.

For example, in the course of decoding, the decoding unit may accumulatethe number of times of occurrence of each prediction mode, which may beowned by the block to be decoded. The accumulated number of times mayindicate the frequency of occurrence, and the decoding unit may select aprediction mode having the highest frequency of occurrence as theadditional MPM candidate mode and may assign it to the MPM list.

The decoding unit may accumulate the number of times of occurrence ofthe prediction mode on a per-slice basis and/or on a per-entropy slicebasis. At this time, the degree of accumulation on a per-slice basisand/or on a per-entropy slice basis may vary, and the decoding unit mayadaptively select the prediction mode having a high frequency ofoccurrence as an additional MPM candidate mode.

According to the above-described method, since the decoding unit mayselect the additional MPM candidate mode without using a separate table,no separate storage space is required, and complexity of operation maybe reduced. Further, the decoding unit may adaptively select theadditional MPM candidate mode according to the frequency of occurrenceof the intra prediction mode, and thus, image compression efficiency maybe enhanced.

Referring back to FIG. 7, the decoding unit may derive the intraprediction mode (S740).

The decoding unit may determine through a parsed MPM flag whether thereis an MPM candidate mode the same as the prediction mode of the block tobe decoded in the MPM list. As described above, in an embodiment, theMPM flag may be represented as prev_intra_luma_pred_flag.

In the case that the MPM flag is 0, that is, in the case that there isno MPM candidate mode that is the same as the prediction mode of theblock to be decoded in the MPM list, the decoding unit may parse aremaining mode from the bit stream received from the encoding unit. Inan embodiment, the remaining mode may be represented asrem_intra_luma_pred_mode. The decoding unit may derive the intraprediction mode of the current block to be decoded using the MPM listand the remaining mode.

In the case that the MPM flag is 1, that is, in the case that there isan MPM candidate mode that is the same as the prediction mode of theblock to be decoded in the MPM list, the decoding unit may parse the MPMindex from the bit stream received from the encoding unit. Hte MPM indexis an index indicating an MPM candidate mode among MPM candidate modesin the MPM list, which is the same as the prediction mode of the blockto be decoded. In an embodiment, the MPM index may be represented asmpm_idx. The decoding unit may derive the intra prediction mode of thecurrent block to be decoded using the MPM list and the MPM index.

For example, in the case that two MPM candidate modes are in the MPMlist, the MPM index may indicate whether the prediction mode of theblock to be decoded is identical to the MPM candidate mode of list[0] orthe MPM candidate mode of list[1]. At this time, the decoding unit maydetermine the MPM candidate mode indicated by the MPM index as the intraprediction mode of the current block to be decoded.

FIG. 8 is a flowchart schematically illustrating a method of deriving anMPM candidate mode using a prediction mode of a neighboring block for ablock to be decoded according to an embodiment of the present invention.

Referring to FIG. 8, the decoding unit may determine whether theprediction mode of the neighboring block is included in the predictionmodes that may be owned by the block to be decoded (S810).

As described above in connection with table 1, the number of intraprediction modes that may be owned by the current block to be decodedmay be a predetermined fixed number. At this time, the prediction modeof the neighboring block may not be included in the prediction modesthat may be owned by the block to be decoded. An embodiment where theprediction mode of the neighboring block is not included in theprediction modes that may be owned by the block to be decoded is similarto the embodiment described in connection with FIG. 6, and the detaileddescription will be omitted.

Referring back to FIG. 8, in the case that the prediction mode of theneighboring block is included in the prediction modes that may be ownedby the block to be decoded, the decoding unit may select the predictionmode of the neighboring block, as is, as the MPM candidate mode (S820).

In the case that the prediction mode of the neighboring block is notincluded in the prediction modes that may be owned by the block to bedecoded, the decoding unit may change the prediction mode of theneighboring block to derive the MPM candidate mode (S830). At this time,the decoding unit may change the prediction mode of the neighboringblock into one of the intra prediction modes that may be owned by thecurrent block to be decoded.

For example, when the number of the prediction modes that may be ownedby the block to be decoded is 18, the prediction modes that may be ownedby the block to be decoded may be 0 to 17. At this time, assuming thatthe prediction mode of the upper neighboring block is 23, the decodingunit may change the prediction mode of the upper neighboring block intoone of the prediction modes 0 to 17.

Various methods may be used to change the prediction mode of theneighboring block. Hereinafter, embodiments of methods of changing theprediction mode of the neighboring block will be described.

In an embodiment, in the case that the prediction mode of theneighboring block is not included in the prediction modes that may beowned by the block to be decoded, the decoding unit may change theprediction mode of the neighboring block into a non-directional mode.The non-directional prediction mode may include a DC mode or a planarmode. For example, the process in which the prediction mode of theneighboring block changes to the planar mode may be represented asfollows:

If intraPredModeN is equal to or larger than intraPredModeNum,

candIntraPredModeN=Intra_Planar

If intraPredModeN is smaller than intraPredModeNum,

candIntraPredModeN=intraPredModeN

Here, intraPredModeN may refer to an intra prediction mode of aneighboring block. For example, in the embodiment illustrated in FIG. 3,when N is A, intraPredModeN may represent a prediction mode of the upperneighboring block. intraPredModeNum may represent the number of intraprediction modes that may be owned by the block to be decoded. Forexample, the number of the intra prediction modes may be set as in theembodiment described in table 1 according to the size of the block to bedecoded. candIntraPredModeN may represent the final prediction mode ofthe changed neighboring block.

In another embodiment, in the case that the prediction mode of theneighboring block is not included in the prediction modes that may beowned by the block to be decoded, the decoding unit may change theprediction mode of the neighboring block into a prediction mode whosemode value is 0. Since an order of the intra prediction modes isgenerally set based on the frequency of occurrence, the frequency ofoccurrence of a prediction mode having a mode value 0 has a higherchance of being larger than the frequency of occurrence of otherprediction modes. Accordingly, since the prediction mode of the currentblock to be decoded has a high chance of being a prediction mode whosemode value is 0, the decoding unit may enhance encoding efficiency bychanging the prediction mode of the neighboring block into a predictionmode whose mode value is 0.

In another embodiment, in the case that the prediction mode of theneighboring block is not included in the prediction modes that may beowned by the block to be decoded, the decoding unit may change theprediction mode of the neighboring block into a prediction modecalculated by a predetermined calculation method.

For example, the predetermined calculation method may be a method ofobtaining a remainder that is obtained by dividing the prediction modeof the neighboring block by the number of the intra prediction modesthat may be owned by the block to be decoded and/or the maximumprediction mode value that may be owned by the block to be decoded. Thatis, the final prediction mode value of the changed neighboring block maybe a remainder obtained by dividing the prediction mode of theneighboring block by the number of the intra prediction modes that maybe owned by the block to be decoded and/or the maximum prediction modevalue that may be owned by the block to be decoded. A process ofchanging the prediction mode of the neighboring block using thepredetermined calculation method may be represented as follows:

If intraPredModeN is equal to or larger than intraPredModeNum,

>>if intraPredModeNum is 4,

candIntraPredModeN=mod(intraPredModeN, 4)

>>unless intraPredModeNum is 4,

candIntraPredModeN=mod(intraPredModeN, 18)

if intraPredModeN is smaller than intraPredModeNum,

candIntraPredModeN=intraPredModeN

Here, mod(X, Y) may represent a remainder obtained by dividing X by Y.

In another embodiment, in the case that the prediction mode of theneighboring block is not included in the prediction modes that may beowned by the block to be decoded, the decoding unit may change theprediction mode of the neighboring block into the prediction mode havingthe highest frequency of occurrence among the prediction modes that maybe owned by the block to be decoded.

For example, in the course of decoding, the decoding unit may accumulatethe number of times of occurrence of each of the prediction modes thatmay be owned by the current block to be decoded. The accumulated numberof times of occurrence may represent a frequency of occurrence, and inan embodiment, the frequency of occurrence may be proportional to theaccumulated number of times of occurrence. The decoding unit may changethe prediction mode of the neighboring block into the prediction modehaving the highest frequency of occurrence.

The decoding unit may also accumulate the number of times of occurrenceof each prediction mode on a per-slice basis and/or on a per-entropyslice basis. At this time, the degree accumulated on a per-slice basisand/or on a per-entropy slice basis may vary, and the decoding unit mayadaptively change the prediction mode of the neighboring block into aprediction mode having a high frequency of occurrence.

Referring back to FIG. 8, the decoding unit may select the changed finalprediction mode as the MPM candidate mode (S840).

According to the method of deriving the MPM candidate mode, the MPMcandidate mode may be derived without using a separate table, so that noseparate storage space is required and operation complexity may bereduced. Further, the decoding unit may adaptively derive the MPMcandidate mode according to the frequency of occurrence of theprediction mode, so that image compression efficiency may be enhanced.

Although the above embodiments have been described based on a series ofsteps or blocks or flowcharts, the present invention is not limited tothe order of the steps, and rather some steps may occur concurrentlywith or in a different order from other steps. Further, it will beunderstood by those skilled in the art that some steps in the flowchartmay be non-exclusively included in other steps, or one or more steps inthe flowchart may be omitted without affecting the scope of theinvention.

The above-described embodiments include various aspects of examples.Although it is not possible to describe all possible combinations torepresent various aspects, it will be understood by those skilled in theart that other combinations may be available. Accordingly, the presentinvention is intended to include all other modifications, alterations,and variations that belong to the appended claims.

1. A video decoding method with a decoding apparatus, comprising:obtaining, with the decoding apparatus, a residual block relating to acurrent block of a video frame to be decoded by entropy-decoding aninput bitstream; obtaining, with the decoding apparatus, a first MostProbably Mode (MPM) candidate mode from at least one neighboring blockadjacent to the current block; generating, with the decoding apparatus,a MPM list based on the first MPM candidate mode; deriving, with thedecoding apparatus, an intra prediction mode of the current block basedon the generated MPM list and a MPM flag, wherein the MPM flag indicateswhether the MPM list includes a same MPM candidate mode as the intraprediction mode of the current block; performing, with the decodingapparatus, intra prediction of the current block based on the derivedintra prediction mode to generate a prediction block relating to thecurrent block; reconstructing, with the decoding apparatus, the currentblock by adding the residual block and the prediction block; andapplying in-loop filter on the reconstructed current block, wherein theMPM list includes a second MPM candidate mode, the second MPM candidatemode being representative of a directional prediction mode, thedirectional prediction mode corresponding to a value resulting fromeither adding one to a value of the first MPM candidate mode orsubtracting one from the value of the first MPM candidate mode.
 2. Thevideo decoding method of claim 2, wherein when the MPM flag indicatesthat the MPM list includes the same MPM candidate mode as the intraprediction mode of the current block, deriving, with the decodingapparatus, the intra prediction mode of the current block comprising:extracting, with the decoding apparatus, a MPM index from a bitstream,the MPM index being signaled to select one of the MPM candidate modesincluded in the MPM list; and determining, with the decoding apparatus,the intra prediction mode of the current block by using the MPM list andthe MPM index.
 3. The video decoding method of claim 1, wherein when theMPM flag indicates that the MPM list does not include the same MPMcandidate mode as the intra prediction mode of the current block,deriving the intra prediction mode of the current block comprising:extracting, with the decoding apparatus, a remaining mode from abitstream, the remaining mode being signaled to specify the intraprediction mode of the current block; reordering, with the decodingapparatus, the MPM candidate modes in ascending order based on acomparison of values of the MPM candidate modes in the MPM list; andderiving, with the decoding apparatus, the intra prediction mode of thecurrent block by using the remaining mode and the reordered MPM list. 4.The video decoding method of claim 1, wherein the MPM list includes afixed number of MPM candidate modes.
 5. The video decoding method ofclaim 4, wherein the fixed number of the MPM candidate modes is equal toor greater than
 3. 6. A video encoding method with an encodingapparatus, comprising: generating, with the encoding apparatus, aprediction block relating to a current block included in a video frameto be encoded by performing intra prediction; generating, with theencoding apparatus, a residual block of the current block; determining,with the encoding apparatus, an intra prediction mode of the currentblock; obtaining, with the encoding apparatus, a first Most ProbablyMode (MPM) candidate mode from at least one neighboring block adjacentto the current block; generating, with the encoding apparatus, a MPMlist based on the first MPM candidate mode; determining, with theencoding apparatus, a MPM flag using the MPM list, wherein the MPM flagindicates whether the MPM list includes a same MPM candidate mode as theintra prediction mode of the current block; and encoding, with theencoding apparatus, the intra prediction mode of the current block byencoding the MPM flag, and wherein the MPM list includes a second MPMcandidate mode, the second MPM candidate mode being representative of adirectional prediction mode, the directional prediction modecorresponding to a value resulting from either adding one to a value ofthe first MPM candidate mode or subtracting one from the value of thefirst MPM candidate mode.
 7. The video encoding method of claim 6,wherein when the MPM flag indicates that the MPM list includes the sameMPM candidate mode as the intra prediction mode of the current block,encoding the intra prediction mode of the current block comprising:determining, with the encoding apparatus, a MPM index, the MPM indexbeing signaled to select one of the MPM candidate modes included in theMPM list; and encoding, with the encoding apparatus, the intraprediction mode of the current block by encoding the MPM index.
 8. Thevideo encoding method of claim 6, wherein when the MPM flag indicatesthat the MPM list does not include the same MPM candidate mode as theintra prediction mode of the current block, encoding the intraprediction mode of the current block comprising: reordering, with theencoding apparatus, the MPM candidate modes in ascending order based ona comparison of values of the MPM candidate modes in the MPM list;determining, with the encoding apparatus, a remaining mode by using theintra prediction mode of the current block and the reordered MPM list;and encoding, with the encoding apparatus, the remaining mode into abitstream, the remaining mode being signaled to specify the intraprediction mode of the current block.
 9. The video encoding method ofclaim 6, wherein the MPM list includes a fixed number of MPM candidatemodes.
 10. The video encoding method of claim 9, wherein the fixednumber of the MPM candidate modes is equal to or greater than
 3. 11. Anon-transitory computer-readable recoding-medium storing a bitstreamwhich is generated by a video encoding method, the method comprising:generating, with the encoding apparatus, a prediction block relating toa current block included in a video frame to be encoded by performingintra prediction; generating, with the encoding apparatus, a residualblock of the current block; determining, with the encoding apparatus, anintra prediction mode of the current block; obtaining, with the encodingapparatus, a first Most Probably Mode (MPM) candidate mode from at leastone neighboring block adjacent to the current block; generating, withthe encoding apparatus, a MPM list based on the first MPM candidatemode; determining, with the encoding apparatus, a MPM flag using the MPMlist, wherein the MPM flag indicates whether the MPM list includes asame MPM candidate mode as the intra prediction mode of the currentblock; and encoding, with the encoding apparatus, the intra predictionmode of the current block by encoding the MPM flag, and wherein the MPMlist includes a second MPM candidate mode, the second MPM candidate modebeing representative of a directional prediction mode, the directionalprediction mode corresponding to a value resulting from either addingone to a value of the first MPM candidate mode or subtracting one fromthe value of the first MPM candidate mode.